import 'package:flutter/material.dart';
// TODO 引入 BottomBar组件
import "pages/tabs2.dart";
import "./pages/search.dart";
import "./pages/form.dart";
import "./pages/news.dart";
import "./pages/hero.dart";

void main() {
  runApp(HomePage());
}

class HomePage extends StatelessWidget {
  HomePage({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      // home: BottomBar(),
      // TODO 路由入口
      initialRoute: '/',
      // TODO 定义路由，但是不能传参
      routes: {
        "/": (context) => BottomBar(),
        "/search": (context) => SearchPage(),
        "/form": (context) => FormPage(),
        "/news": (context) => NewsPage(),
        "/hero": (context) => HeroPage(),
      },
    );
  }
}
